import request from '@/utils/request'

export function fetchList(query) {
  return request({
    url:'/teacher/page',
    method: 'get',
    params: query
  })
}

export function teacherInfo(obj) {
  return request({
    url:'/teacher/info',
    method: 'post',
    data: obj
  })
}

export function getObj(id) {
  return request({
    url:'/teacher/' + id,
    method: 'get'
  })
}

export function addObj(obj) {
  return request({
    url:'/teacher',
    method: 'post',
    data: obj
  })
}

export function putObj(obj) {
  return request({
    url:'/teacher',
    method: 'put',
    data: obj
  })
}

export function delObj(id) {
  return request({
    url:'/teacher/' + id,
    method: 'delete'
  })
}

export function studentInfo(obj) {
  return request({
    url:'/student/info',
    method: 'post',
    data: obj
  })
}
export function putStudentObj(obj) {
  return request({
    url:'/student/updateStudent',
    method: 'post',
    data: obj
  })
}

export function changePassObj(obj) {
  return request({
    url: '/user/changePass',
    method: 'post',
    data: obj
  })
}
